package com.test.service.client;
import com.test.entitys.User;
import com.test.service.client.impl.UserFailbackClient;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
/**
 * @author 刘畅
 */ //Eureka 加上它才能完成openFeign的效果
@FeignClient(value = "USER-SERVICE",fallback = UserFailbackClient.class)//声明为userservice服务的HTTP请求客户端
public interface UserClient {
    @GetMapping("/user/{uid}")
    User findUserById(@PathVariable("uid") int uid);
}
